package com.example.test.dialogfactory;

import android.content.Context;
import android.content.Intent;
import android.graphics.PorterDuff.Mode;
import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;

public class MainActivity120 extends AppCompatActivity {

    private PorterDuffView p0;
    private PorterDuffView p1;
    private PorterDuffView p2;
    private PorterDuffView p3;
    private PorterDuffView p4;
    private PorterDuffView p5;
    private PorterDuffView p6;
    private PorterDuffView p7;
    private PorterDuffView p8;
    private PorterDuffView p9;
    private PorterDuffView p10;
    private PorterDuffView p11;
    private PorterDuffView p12;
    private PorterDuffView p13;
    private PorterDuffView p14;
    private PorterDuffView p15;

    public static void start( Context context ) {

        Intent starter = new Intent( context, MainActivity120.class );
        context.startActivity( starter );
    }

    @Override
    protected void onCreate( Bundle savedInstanceState ) {

        super.onCreate( savedInstanceState );
        setContentView( R.layout.activity_main120 );
        initView();
    }

    private void initView() {

        p0 = (PorterDuffView) findViewById( R.id.p0 );
        p1 = (PorterDuffView) findViewById( R.id.p1 );
        p2 = (PorterDuffView) findViewById( R.id.p2 );
        p3 = (PorterDuffView) findViewById( R.id.p3 );
        p4 = (PorterDuffView) findViewById( R.id.p4 );
        p5 = (PorterDuffView) findViewById( R.id.p5 );
        p6 = (PorterDuffView) findViewById( R.id.p6 );
        p7 = (PorterDuffView) findViewById( R.id.p7 );
        p8 = (PorterDuffView) findViewById( R.id.p8 );
        p9 = (PorterDuffView) findViewById( R.id.p9 );
        p10 = (PorterDuffView) findViewById( R.id.p10 );
        p11 = (PorterDuffView) findViewById( R.id.p11 );
        p12 = (PorterDuffView) findViewById( R.id.p12 );
        p13 = (PorterDuffView) findViewById( R.id.p13 );
        p14 = (PorterDuffView) findViewById( R.id.p14 );
        p15 = (PorterDuffView) findViewById( R.id.p15 );

        p0.setXfermode( Mode.CLEAR );
        p1.setXfermode( Mode.SRC );
        p2.setXfermode( Mode.DST );
        p3.setXfermode( Mode.SRC_OVER );
        p4.setXfermode( Mode.DST_OVER );
        p5.setXfermode( Mode.SRC_IN );
        p6.setXfermode( Mode.DST_IN );
        p7.setXfermode( Mode.SRC_OUT );
        p8.setXfermode( Mode.DST_OUT );
        p9.setXfermode( Mode.SRC_ATOP );
        p10.setXfermode( Mode.DST_ATOP );
        p11.setXfermode( Mode.XOR );
        p12.setXfermode( Mode.DARKEN );
        p13.setXfermode( Mode.LIGHTEN );
        p14.setXfermode( Mode.MULTIPLY );
        p15.setXfermode( Mode.SCREEN );

    }
}